<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilasu: SHA3 Client APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilasu
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xasu__sha3__client__apis.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">SHA3 Client APIs</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga522f701ac29ec343d5ad2d90ebac4a2a"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__sha3__client__apis.html#ga522f701ac29ec343d5ad2d90ebac4a2a">XAsu_Sha3Operation</a> (<a class="el" href="struct_x_asu___client_params.html">XAsu_ClientParams</a> *ClientParamPtr, <a class="el" href="struct_x_asu___sha_operation_cmd.html">XAsu_ShaOperationCmd</a> *ShaClientParamPtr)</td></tr>
<tr class="memdesc:ga522f701ac29ec343d5ad2d90ebac4a2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends a command to ASUFW to generate the digest for the provided input message using the specified SHA algorithm.  <a href="#ga522f701ac29ec343d5ad2d90ebac4a2a">More...</a><br/></td></tr>
<tr class="separator:ga522f701ac29ec343d5ad2d90ebac4a2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6bee0e4d744e4febdfbb84efd76ae207"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__sha3__client__apis.html#ga6bee0e4d744e4febdfbb84efd76ae207">XAsu_Sha3Kat</a> (<a class="el" href="struct_x_asu___client_params.html">XAsu_ClientParams</a> *ClientParamPtr)</td></tr>
<tr class="memdesc:ga6bee0e4d744e4febdfbb84efd76ae207"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends a command to ASUFW to run the SHA3 Known Answer Tests (KAT's).  <a href="#ga6bee0e4d744e4febdfbb84efd76ae207">More...</a><br/></td></tr>
<tr class="separator:ga6bee0e4d744e4febdfbb84efd76ae207"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga6bee0e4d744e4febdfbb84efd76ae207"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">s32 XAsu_Sha3Kat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_asu___client_params.html">XAsu_ClientParams</a> *&#160;</td>
          <td class="paramname"><em>ClientParamPtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends a command to ASUFW to run the SHA3 Known Answer Tests (KAT's). </p>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS, if IPI request to ASU is sent successfully.</li>
<li>XASU_INVALID_ARGUMENT, if any argument is invalid.</li>
<li>XASU_QUEUE_FULL, if Queue buffer is full.</li>
<li>XST_FAILURE, if sending IPI request to ASU fails. </li>
</ul>
</dd></dl>
<p>Validate input parameters.</p>
<p>Generate unique ID and register the callback.</p>
<p>Create command header.</p>
<p>Update request buffer and send an IPI request to ASU. </p>

<p>References <a class="el" href="group__xasu__client__info.html#gad0de9c14ad7810516d9f71d5b18c44c1">XAsu_CreateHeader()</a>, <a class="el" href="group__xasu__client__info.html#gga06fc87d81c62e9abb8790b6e5713c55bacf18aeeb8b7146572b4eadc9780ad4cb">XASU_INVALID_UNIQUE_ID</a>, <a class="el" href="group__xasu__common__defs.html#gab2ea82483072fe1f10f4d5dfb9ffde8c">XASU_MODULE_SHA3_ID</a>, <a class="el" href="group__xasu__client__info.html#ga6653ca717c2d2ed8399945c294af2f9f">XAsu_RegCallBackNGetUniqueId()</a>, <a class="el" href="group__xasu__common__defs.html#gaf93a04d434eb1a5f7cf9f5c4cd2f717a">XASU_SHA_KAT_CMD_ID</a>, <a class="el" href="group__xasu__common__defs.html#ga0e29ca164aa8fa3ac30a7b9102b615d9">XASU_UNIQUE_ID_MAX</a>, <a class="el" href="group__xasu__client__info.html#ga202195f871d91b50787438e2782be07f">XAsu_UpdateQueueBufferNSendIpi()</a>, and <a class="el" href="group__xasu__client__info.html#gae0f7072bf1eddf7ee11f1e5852570682">XAsu_ValidateClientParameters()</a>.</p>

</div>
</div>
<a class="anchor" id="ga522f701ac29ec343d5ad2d90ebac4a2a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">s32 XAsu_Sha3Operation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_asu___client_params.html">XAsu_ClientParams</a> *&#160;</td>
          <td class="paramname"><em>ClientParamPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_asu___sha_operation_cmd.html">XAsu_ShaOperationCmd</a> *&#160;</td>
          <td class="paramname"><em>ShaClientParamPtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sends a command to ASUFW to generate the digest for the provided input message using the specified SHA algorithm. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ClientParamPtr</td><td>Pointer to the <a class="el" href="struct_x_asu___client_params.html" title="This structure contains client parameters information. ">XAsu_ClientParams</a> structure which holds client input arguments. </td></tr>
    <tr><td class="paramname">ShaClientParamPtr</td><td>Pointer to the <a class="el" href="struct_x_asu___sha_operation_cmd.html" title="This structure contains SHA params info. ">XAsu_ShaOperationCmd</a> structure which holds parameters of sha input arguments.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS, if IPI request to ASU is sent successfully.</li>
<li>XASU_INVALID_ARGUMENT, if any argument is invalid.</li>
<li>XST_FAILURE, if sending IPI request to ASU fails. </li>
</ul>
</dd></dl>
<p>Validate input parameters.</p>
<p>The maximum length of input data should be less than 0x1FFFFFFC bytes, which is the ASU DMA's maximum supported data transfer length.</p>
<p>If operation flag is set to START,</p>
<ul>
<li>Generate Unique ID.</li>
<li>Save the Context.</li>
</ul>
<p>If operation flag is either UPDATE or FINISH,</p>
<ul>
<li>Verify the context.</li>
</ul>
<p>If FINISH operation flag is set, update response buffer details.</p>
<p>Create command header.</p>
<p>Update request buffer and send an IPI request to ASU. </p>

<p>References <a class="el" href="struct_x_asu___client_params.html#a4807bde0253b2c3f56ddaafad586fafb">XAsu_ClientParams::ClientCtx</a>, <a class="el" href="struct_x_asu___sha_operation_cmd.html#a0c80fb45a77e0d8703c26624f7880384">XAsu_ShaOperationCmd::DataAddr</a>, <a class="el" href="struct_x_asu___sha_operation_cmd.html#a158287b66e45758c02fa6738afad4716">XAsu_ShaOperationCmd::DataSize</a>, <a class="el" href="struct_x_asu___sha_operation_cmd.html#a5a46d5d9f4cbfa657beb34d64989fb93">XAsu_ShaOperationCmd::HashAddr</a>, <a class="el" href="struct_x_asu___sha_operation_cmd.html#afc4e0234d282f65f5a863173f5003624">XAsu_ShaOperationCmd::HashBufSize</a>, <a class="el" href="struct_x_asu___sha_operation_cmd.html#afac49d6bc5df4eb5cfcc97cdfd808436">XAsu_ShaOperationCmd::IsLast</a>, <a class="el" href="struct_x_asu___sha_operation_cmd.html#a3e45916a5f844bc83a5607e5f836cd5a">XAsu_ShaOperationCmd::OperationFlags</a>, <a class="el" href="struct_x_asu___sha_operation_cmd.html#a156f2363c44178819cae2f58e1fdab5c">XAsu_ShaOperationCmd::ShaMode</a>, <a class="el" href="group__xasu__client__info.html#gad0de9c14ad7810516d9f71d5b18c44c1">XAsu_CreateHeader()</a>, <a class="el" href="group__xasu__client__info.html#gga06fc87d81c62e9abb8790b6e5713c55baba48c86a73142cb74e29cb65cbde6a30">XASU_FAIL_SAVE_CTX</a>, <a class="el" href="group__xasu__client__info.html#ga97e484d9d293c91c125205c768cdc7d5">XAsu_FreeCtx()</a>, <a class="el" href="group__xasu__client__info.html#gga06fc87d81c62e9abb8790b6e5713c55ba21f6a079219ddf14b57959e9a40be8b9">XASU_INVALID_ARGUMENT</a>, <a class="el" href="group__xasu__client__info.html#gga06fc87d81c62e9abb8790b6e5713c55bacf18aeeb8b7146572b4eadc9780ad4cb">XASU_INVALID_UNIQUE_ID</a>, <a class="el" href="group__xasu__common__defs.html#gab2ea82483072fe1f10f4d5dfb9ffde8c">XASU_MODULE_SHA3_ID</a>, <a class="el" href="group__xasu__client__info.html#ga6653ca717c2d2ed8399945c294af2f9f">XAsu_RegCallBackNGetUniqueId()</a>, <a class="el" href="group__xasu__common__defs.html#gab4bda5abb6cea66699d85952c0ea0c68">XASU_SHA_256_HASH_LEN</a>, <a class="el" href="group__xasu__common__defs.html#ga03b4e128752ecabe8915b7c8a8a4d73f">XASU_SHA_384_HASH_LEN</a>, <a class="el" href="group__xasu__common__defs.html#ga2f1dce4b9423d6e10cd1914f67a70178">XASU_SHA_512_HASH_LEN</a>, <a class="el" href="group__xasu__common__defs.html#ga3f016e4ef4883ce5be0ecc6bc2d19fc2">XASU_SHA_FINISH</a>, <a class="el" href="group__xasu__common__defs.html#ga2ff7f0c006a8fd37526d549b4b02b511">XASU_SHA_MODE_SHA256</a>, <a class="el" href="group__xasu__common__defs.html#ga8abe96be07950583b1b86b109031db97">XASU_SHA_MODE_SHA384</a>, <a class="el" href="group__xasu__common__defs.html#gaf72009eaaf78e4306eba5db7264a6560">XASU_SHA_MODE_SHA512</a>, <a class="el" href="group__xasu__common__defs.html#gaacee72cf9c2d25a922f117c6da956f25">XASU_SHA_MODE_SHAKE256</a>, <a class="el" href="group__xasu__common__defs.html#ga219220a0d5563c2fc911864cd15a8d96">XASU_SHA_OPERATION_CMD_ID</a>, <a class="el" href="group__xasu__common__defs.html#gadaa7ebc839c9b19fe4e3609877acc0cf">XASU_SHA_START</a>, <a class="el" href="group__xasu__common__defs.html#gafcc80db079322fc46fb6df27f6fa2aa2">XASU_SHA_UPDATE</a>, <a class="el" href="group__xasu__common__defs.html#ga48a92eac5a3ea3621a0f3a5e3aefb2be">XASU_SHAKE_256_HASH_LEN</a>, <a class="el" href="group__xasu__common__defs.html#ga0e29ca164aa8fa3ac30a7b9102b615d9">XASU_UNIQUE_ID_MAX</a>, <a class="el" href="group__xasu__client__info.html#ga936fc8dfbd6e1c63ea38d52c0a89f55b">XAsu_UpdateCallBackDetails()</a>, <a class="el" href="group__xasu__client__info.html#gab89446614128abd944047e7c55b1cda2">XAsu_UpdateNGetCtx()</a>, <a class="el" href="group__xasu__client__info.html#ga202195f871d91b50787438e2782be07f">XAsu_UpdateQueueBufferNSendIpi()</a>, <a class="el" href="group__xasu__client__info.html#gae0f7072bf1eddf7ee11f1e5852570682">XAsu_ValidateClientParameters()</a>, and <a class="el" href="group__xasu__client__info.html#ga61795a5278b8baf8896d7a81e03c9f6a">XAsu_VerifyNGetUniqueIdCtx()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
